const express = require('express');

// express其实是一个函数: createApplication

// 返回app
const app = express();

// 监听默认路径
app.get('/', (req, res, next) => {
    res.end('hello');
})

app.post('/', (req, res, next) => {
    res.end('hello post');
})
 
//开启监听
app.listen(8000, () => {
    console.log('express server: welcome');
})